import {reqLoginInfo} from '@/api'

const actions={
  async  getLoginUserInfo({commit}){
    // 发送请求获取用户信息
    const result =await reqLoginInfo()
    if(result.code===200){
        commit('SAVE_USER_INFO',result.data)
        console.log(123456);
    }
    //获取用户信息失败
     console.log(result.message);
    }
}
const mutations={
    SAVE_USER_INFO(state,info){
        state.userInfo=info
    }
}
const state ={
    userInfo:{}
}
const getters={}

export default {
    actions,
    mutations,
    state,
    getters
}